package com.vt.admin.api.feign;

import com.vt.admin.api.dto.user.UserInfo;
import com.vt.common.core.constant.ServiceNameConstant;
import com.vt.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Auther: PanZha
 * @Date: 2018/10/11 12:26
 */
@FeignClient(value = ServiceNameConstant.UMPS_SERVICE)
public interface RemoteUserService {
	/**
	 * 通过用户名查询用户、角色信息
	 */
	@GetMapping("/user/info/{username}")
	R<UserInfo> info(@PathVariable("username") String username
            , @RequestHeader("from") String from);

	/**
	 * 通过社交账号查询用户、角色信息
	 *
	 * @param inStr appid@code
	 */
	@GetMapping("/social/info/{inStr}")
	R<UserInfo> social(@PathVariable("inStr") String inStr);

	@GetMapping("/user/mobile/{mobile}")
	R<UserInfo> mobile(@PathVariable("mobile") String mobile);

	@GetMapping("/social/unbind")
	R unbind();
}
